home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 127 / PC Guia 127.iso / Software / Utils / GParted Live CD / Bin / gparted-livecd-0.2.2.iso / fake / needwrite / etc / dev.d / net / hotplug.dev
Encoding:
Text File  |  2006-01-27  |  594 b   |  24 lines

  1. #!/bin/sh
  2. #
  3. # Script to ensure that any network device that udev renames
  4. # still gets the hotplug script run with the proper name.
  5. #
  6. # Released under the GPL v2
  7. #
  8. # Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
  9. #
  10.  
  11. # See if we really did rename this device.
  12. if [ "$INTERFACE" = "$DEVNAME" ]; then
  13.     exit 0
  14. fi
  15.  
  16. # ok, we have renamed this device, so let's set $INTERFACE to the new name
  17. # and call the network hotplug script to handle it properly...
  18. INTERFACE=$DEVNAME
  19. export INTERFACE
  20. if [ -f /etc/hotplug.d/default/default.hotplug ]; then
  21.     /etc/hotplug.d/default/default.hotplug net
  22. fi
  23.  
  24.